<include file="Common:header"/>
    <div class="container content">
      <if condition="I('get.id') eq null">
        <form action="{:U('Works/addWorks')}" enctype="multipart/form-data" method="post">
      <else/>
        <form action="{:U('Works/updateWorks')}" enctype="multipart/form-data" method="post">
          <input type="hidden"  value="{:I('get.id')}" name="id" value="">
      </if>
        <div class="form-group">
              <label>作品标题</label>
              <input name="title" value="{$work.title}" type="text" class="form-control" >
        </div>
        <div class="form-group">
              <label>地址</label>
              <input name="url" value="{$work.url}" type="text" class="form-control"  >
        </div>
        <div class="form-group">
              <label>完成时间</label>
              <input name="time" value="{$work.time}" type="text" class="form-control"  >
        </div>
         <div class="form-group">
               <label>预览图</label>
               <input type="file" name="preview" value="">
         </div>
         <if condition="I('get.id') eq null">
           <button type="submit" class="btn btn-primary btn-lg btn-block"  >发布</button>
         <else/>
           <button type="submit" class="btn btn-primary btn-lg btn-block">提交修改</button>
         </if>
      </form>
    </div>


<include file="Common:js"/>
</body>
</html>
